<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'rightRoleSet.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	
	 <style type="text/css">
  body{
		margin: 6px;
		padding: 0;
		font-size: 12px;
		font-family: tahoma, arial;
		background: #fff;
		text-align: center
		
}

table{
		width: 50%;
}
tr.odd{
		background: #fff;
	}
	tr.even{
		background: #eee;
}

div.datagrid_div{
	width: 100%;
	border: 1px solid #999;
}



	/*****************样式2*******************/
	table.datagrid2{
		border-collapse: collapse; 
		margin:auto;
	}
	table.datagrid2 th{
		text-align: center;
		background: #9cf;
		padding: 3px;
		border: 1px #333 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:14px;
	}
	table.datagrid2 td{
		padding: 3px;
		border: none;
		border:1px #000000 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:12px;

	}


	/*****************样式5*******************/
	table.datagrid5{
		border-collapse: collapse; 
		margin:auto;
		width:30%;
		
	}
	table.datagrid5 th{
		text-align: left;
		background: #9cf;
		padding: 3px;
		border: 1px #333 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:14px;
	}
	table.datagrid5 td{
		padding: 3px;
		border: none;
		border:1px #333 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:12px;
		text-align:right;
	}
	
	table.datagrid5 td.right{
		padding: 3px;
		border: none;
		border:1px #333 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:12px;
		text-align:left;
	}
	
	


	/*****************************************/

   table.datagrid6{
		border-collapse: collapse; 
		margin:auto;
		width:50%;
		border:1px;
	}
	table.datagrid6 th{
		text-align: left;
		background: #9cf;
		padding: 3px;
		border: 1px #333 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:14px;
	}
	table.datagrid6 td{
		padding: 3px;
		border: none;
		border:1px #333 solid;
		font-family: "宋体",Arial, sans-serif;
		font-size:12px;

	}
   









	tr:hover,
	tr.hover{
		background: #9cf;
	}

    a:link { 
     font-weight: bold; 
     text-decoration: none; 
     color: #6C6C6C;
 }
   a:visited { 
     font-weight: bold; 
     text-decoration: none; 
     color: #6C6C6C;
 }
  a:hover, a:active { 
    text-decoration: underline; 
    color: #4A4AFF;
 } 
  </style>
  
  <script type="text/javascript"> 
  function add_event(tr){
			tr.onmouseover = function(){
				tr.className += ' hover';
			};
			tr.onmouseout = function(){
				tr.className = tr.className.replace(' hover', '');
			};
		}

		function stripe(table) {
			var trs = table.getElementsByTagName("tr");
			for(var i=1; i<trs.length; i++){
				var tr = trs[i];
				tr.className = i%2 != 0? 'odd' : 'even';
				add_event(tr);
			}
		}

		window.onload = function(){
			var tables = document.getElementsByTagName('table');
			
			for(var i=0; i<tables.length; i++){
				var table = tables[i];
				if(table.className == 'datagrid1' || table.className == 'datagrid2'
					|| table.className == 'datagrid3' || table.className == 'datagrid4'){
					stripe(tables[i]);
				}
			}
		}		
	
  </script>
  
  
  
	
	
	
	
	
	
	
	
	



  </head>
 <body> 
  <h5 align="center">角色权限设置</h5>
  
   <table class="datagrid2">
   <tr>
      <th bgcolor="#ffffff">序号</th>
      <th bgcolor="#ffffff">角色名称</th>
      <th bgcolor="#ffffff">设置</th>
   </tr>
   
   

   <c:forEach items="${sessionScope.roleList}"   var="role" varStatus="listStatus">
       <input type="hidden" name="action" value="roleSet"/>
   <tr>
       <input type="hidden" name="id" value="${role.id}"/>
      <td bgcolor="#ffffff" align="center">${listStatus.index+1}</td>
      <td bgcolor="#ffffff" align="center">${role.roleName}</td>
      <td bgcolor="#ffffff" align="center"><a href="rightRole?action=roleSet&&roleID=${role.id}&&roleName=${role.roleName}">权限设置</a></td>
   </tr>
   </c:forEach>
   </table> 
   
   
   
   
   
   
  </body>
</html>
